package com.xinou.daily_report.VO.integral;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xinou.daily_report.utils.CustomerDoubleSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author ${author}
 * @since 2021-07-06
 */
@Data
@Accessors(chain = true)
public class IntegralVO {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "加分的原因")
    private String reason;

    @ApiModelProperty(value = "此次加的分数")
    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double theIntegral;

    private Long userId;

    @ApiModelProperty(value = "用户姓名")
    private String userName;

    private Long addUserId;

    @ApiModelProperty(value = "谁加的分")
    private String addUserName;

    @ApiModelProperty(value = "类型0表示加分，1表示减分")
    private Integer integralType;

    private Long deptId;

    private String deptName;

    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double sumAdd;

    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double sumDec;

    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double sum;

    @ApiModelProperty(value = "插入时间 yyyy-MM-dd HH:mm:ss", example = "2020-11-28 00:12:23", required = true)
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "insert_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime insertTime;


    @ApiModelProperty(value = "时间 yyyy-MM-dd HH:mm:ss", example = "2020-11-28 00:12:23", required = true)
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtCreate;

    private Integer rank;

    private List<IntegralVO> integralVOList;

    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double sumMiniDec;


}
